﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;

public partial class yaopin : System.Web.UI.Page
{
    private static string sqlconn = System.Configuration.ConfigurationManager.AppSettings["sqlcon"].ToString().Trim();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnjia_Click1(object sender, EventArgs e)
    {
        string id = txtyid.Text.Trim();
        string name = txtyname.Text.Trim();
        string guige = txtyguige.Text.Trim();
        string type = txttype.Text.Trim();
        string fun = txtyfun.Text.Trim();
        string place = txtyplace.Text.Trim();

        string gname = txtgname.Text.Trim();
        users us = new users();
        us.id = id;
        us.name = name;
        us.guige = guige;
        us.type = type;
        us.fun = fun;
        us.place = place;

        us.gname = gname;
        int result = us.addyaopin(us);
        if (result > 0)
        {
            Response.Write("<script>alert(\"添加成功！\")</script>");

        }
    }
    protected void btncin_Click(object sender, EventArgs e)
    {
        txtyid.Text = null;
        txtyname.Text = null;
        txtyguige.Text = null;
        txttype.Text = null;
        txttype.Text = null;
        txtyplace.Text = null;
    }
}